sudo apt install -y --no-install-recommends git libxslt1-dev libxml2-dev libbz2-dev libncurses5-dev libgdbm-dev liblzma-dev libsqlite3-dev libssl-dev libreadline6-dev build-essential libffi-dev zlibc zlib1g-dev

sudo curl -L https://gitee.com/ibopo/pyenv-installer/raw/master/bin/pyenv-installer | bash

echo 'export PATH="$HOME/.pyenv/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
echo 'eval "$(pyenv virtualenv-init -)"' >> ~/.bashrc

export PATH="$HOME/.pyenv/bin:$PATH"
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"

v=3.8.5; wget -c https://npm.taobao.org/mirrors/python/$v/Python-$v.tar.xz -P ~/.pyenv/cache/; env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install $v -v
# pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple

pyenv shell $v
# pyenv global $v

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
# pip config set install.trusted-host mirrors.neusoft.edu.cn
pip install pip -U
